﻿@model SoftHotel.Models.ReservaHab

@{
    ViewBag.Title = "Editar";
}

<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

<link href="@Url.Content("~/Content/themes/base/jquery.ui.core.css")"  
        rel="stylesheet" type="text/css" /> 
<link href="@Url.Content("~/Content/themes/base/jquery.ui.datepicker.css")"  
        rel="stylesheet"  type="text/css" /> 
<link href="@Url.Content("~/Content/themes/base/jquery.ui.theme.css")"  
        rel="stylesheet" type="text/css" /> 
<link href="@Url.Content("~/Content/themes/base/jquery.ui.all.css")" rel="stylesheet" type="text/css" />
 
<script src="@Url.Content("~/Scripts/jquery.ui.core.js")"  
        type="text/javascript"></script> 
<script src="@Url.Content("~/Scripts/jquery.ui.datepicker.js")"  
        type="text/javascript"></script> 
<script src="@Url.Content("~/Scripts/jquery.validate.js")"  
        type="text/javascript"></script> 

<script type="text/javascript">
    $(document).ready(function () {

        $('.date').datepicker
        ({

            dayNamesMin: ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sa"],
            monthNames: ["January", "February", "March", "April", "Mayo", "Junio", "Julio", "August", "September", "October", "November", "December"],
            dateFormat: 'dd/mm/yy',
            minDate: 0

        });
    });

</script>
@using (Html.BeginForm())
{   
    @Html.ValidationSummary(true)

    <h1><strong>Nueva Reserva</strong></h1>
    <br />
    <table id="MainContent_Table1" rules="none" style="border-color: Black; width: 900px; margin-bottom: 0px;"> 
            <tr>
		        <td style="font-weight: bold; width: 220px;">Número de Reserva</td>
                <td style="width: 220px;">@Html.DisplayFor(model => model.numeroReserva)</td>
		        <td style="width: 20px;"></td>
                <td style="font-weight: bold; width: 220px;">Fecha Creación</td>
		        <td style="width: 220px;">@Html.DisplayFor(model => model.fechaCreacion)</td>   
	        </tr>
            <tr>
		        <td style="font-weight: bold; width: 220px;">Cliente</td>
                <td style="width: 220px;">@Html.DisplayFor(model => model.idCliente)</td>
		        <td style="width: 20px;"></td>
                <td style="font-weight: bold; width: 220px;">Nombre/Razón Social</td>
		        <td style="width: 220px;">@Html.DisplayFor(model => model.nombreRazonSocial)</td>   
	        </tr>
            <tr>
                <td style="font-weight: bold; width: 220px;">Tipo de Documento</td>
		        <td style="width: 220px;">@Html.DisplayFor(model => model.tipoDocumento)</td>
		        <td style="width: 20px;"></td>
		        <td style="font-weight: bold; width: 220px;">Número de Documento</td>
		        <td style="width: 220px;">@Html.DisplayFor(model => model.numeroDocumento)</td>
	        </tr>
            <tr>
                <td style="font-weight: bold; width: 220px;">Fecha de Check-in</td>
		        <td style="width: 220px;">
                @Html.TextBox("fechaCheckin", String.Format("{0:d}", (string)Model.fechaCheckin.ToShortDateString()), new { @class = "date" })
                @Html.ValidationMessageFor(model => model.fechaCheckin)</td>
		        <td style="width: 20px;"></td>
		        <td style="font-weight: bold; width: 220px;">Fecha de Check-out</td>
		        <td style="width: 220px;"> 
                @Html.TextBox("fechaCheckout", String.Format("{0:d}", (string)Model.fechaCheckout.ToShortDateString()), new { @class = "date" })
                @Html.ValidationMessageFor(model => model.fechaCheckout)</td>
	        </tr>
            <tr>
                <td style="font-weight: bold; width: 220px;">Estado</td>
		        <td style="width: 220px;">@Html.DisplayFor(model => model.nombreEstado)</td>
                <td style="width: 20px;"></td>
		        <td style="font-weight: bold; width: 220px;">Total</td>
		        <td style="width: 220px;">@Html.DisplayFor(model => model.total)</td>
	        </tr>
    </table>
    <br /> 
    <br />
}
 
 <fieldset>
    <legend>Detalle de Reserva</legend>
    
     @using (Html.BeginForm("AgregarDetalle", "ReservaHab", FormMethod.Get))
     {
        
        <p>
            @Html.HiddenFor(model => model.idReserva)
    
            <input type="submit" value="Añadir" />
        </p> 
      
    }

        <div id="box" class="data" style="visibility:visible;">
            @* Section to display partial forms *@ 
            @Html.Action("_vistaParcial", new { id = Model.idReserva })
        </div>



    </fieldset>
  
      <form action = "Editar" method = "post">
        <center>
	        <input value="Checkin" type="submit" name = "button"/> @{/* que estos sean tipo button*/}
	        <input value="Checkout" type="submit" name = "button"/>
            <input value="Volver" type="submit" name = "button"/>
        </center>
    </form>



   